# Makefile2.6
ifneq ($(KERNELRELEASE),)
#kbuild syntax. dependency relationshsip of files and target modules are listed here.
mymodule-objs := ec_it8733_dev.o
obj-m := ec_it8733_dev.o 
else
PWD := $(shell pwd)
KVER ?= $(shell uname -r)
#KDIR := /lib/modules/$(KVER)/build
#KDIR := /usr/src/kernels/3.10.84-22.fc21.loongson.10.mips64el //

KDIR := /lib/modules/$(KVER)/build

TGT_DEV := dev

all: $(TGT_DEV)
	#$(MAKE) -C $(KDIR) M=$(PWD)
#	#gcc -c ecramdrvtest.c 
	#gcc ec_it8733_demo.c -o ec_it8733_demo

$(TGT_DEV):
	$(MAKE) -C $(KDIR) M=$(PWD)

clean:
	rm -rf .*.cmd *.o *.mod.c *.ko .tmp_versions modules.order  Module.symvers $(TGT_DEMO)
endif
